package cn.gok.service;

import cn.gok.entity.TDormitory;
import cn.gok.entity.TDormitoryPositon;
import cn.gok.entity.TStudent;
import cn.gok.entity.TStudentDormitory;

import cn.gok.util.R;

import java.util.List;

public interface ManagerService {
    //查看学生
    R queryStudent(String realName, String gender,String schoolName,String  startTime,String denTime,int currentPage, int pageSize);
    //添加学生
    R addStudent( String realName,String stuName, String password,String gender,int age,String schoolName,String phoneNum);

    //新增宿舍
    R addDormitory(String position,String apartmentName,String floor,String doorNum,
                   String max, String type,String state,int managerId);

    //获取地址
    R queryPosition();

    //获取单元号
    R queryApartmentName();

    //批量插入学生信息
    int addStudents(List<TStudent> student);

    //修改宿舍信息
    R updateDormitory(String doorNum,String type,String max,String
            apartmentName,String position,String oldDoorNum);
    //查询楼层
    R queryFloor(String position,String apartmentName);

    //查询宿舍
    R queryDormitory(String apartmentName,String floor, String type, String state,int currentPage, int pageSize);


    //通过楼房id去查有哪些宿舍
    List<TDormitory> queryAllDoorNumByDormPosId(String  id, int state);

    //通过寝室门牌号去查询该寝室信息
    TDormitory queryDormitoryByDoor(int doorNum);

    //通过寝室门牌号去减少该寝室的剩余床位数
    R reduceSurplusNumByDoor(int doorNum,int state);

    //通过寝室门牌号去查询该寝室的剩余的剩余人数
    R querySurplusNumByDoor(int doorNum);

    //通过学生id查询学生入住信息
    TStudentDormitory queryStuDormitoryByStuId(int id);

    //学生入住
    R studentCheckIn(int stuId,int dormId);
    //查看学号是否存在
    TStudent queryStudentById(String stuId);
    //查询所有的房屋位置信息
    List<TDormitoryPositon> queryAllDormitoryPosition();
    //退寝
    R out(String stuId);
    //退寝后，剩余床位加1
    R addSurplus(String stuId);
    //判断学生是否入住
    R queryStudentLive(String stuId);
    //统计
    R queryAll();


}
